// Ask the user for two integers, x and n and print x^n.
#include <iostream>


// The function power takes two integer arguments and returns x^n.
int power(int x, int n)
{
  if(n == 0) return 1;

  int answer = 1;
  for(int i = 0; i < n; i++) {
    answer *= x;
  }

  return answer;
}

int main()
{
  int x, n;

  // Get the numbers:
  std::cout << "Enter two integers:\n";
  std::cin >> x >> n;

  // Print the answer:
  std::cout << x << "^" << n << " = " << power(x, n) << std::endl;
  return 0;
}
